<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>v-on:按键修饰符</title>

		<script src="js/vue.js"></script>
	</head>

	<body>
		<div id="app">
			Vue:<input type="text" @keydown.enter="fun()">
		</div>
	</body>
	<script>
		new Vue({
			el:"#app",
			methods:{
				fun:function(){
					alert("按下的是回车键");
				}
			}
		});
	</script>

</html>